Skip to content

refactor: replace oplog with public Op/ReadOp sum types on Backend interface#236

Merged
alecthomas merged 1 commit intomainfrom
aat/refactor-metadatadb-backend-ops
Mar 30, 2026
Merged

refactor: replace oplog with public Op/ReadOp sum types on Backend interface#236
alecthomas merged 1 commit intomainfrom
aat/refactor-metadatadb-backend-ops

Conversation

@alecthomas
Copy link
Copy Markdown
Collaborator

Move the metadatadb abstraction from blob-level Load/Store to
operation-level Apply/Query, enabling future backends (e.g. Redis)
to handle ops natively rather than serializing entire namespaces.

  • Introduce Op and ReadOp sealed interfaces with exhaustive type
    switches in applyOp/queryState
  • Replace old Backend (Load/Store/Lock/Unlock) with new Backend
    (Apply/Query/Flush/Close)
  • Inline sync machinery directly into S3Backend
  • MemoryBackend implements Backend directly with no sync
  • Add TwoBackendsConcurrentOps test exercising cross-backend sync

Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

@alecthomas alecthomas requested a review from a team as a code owner March 30, 2026 05:41
@alecthomas alecthomas requested review from stuartwdouglas and removed request for a team March 30, 2026 05:41
@alecthomas alecthomas enabled auto-merge (squash) March 30, 2026 05:41
@alecthomas alecthomas disabled auto-merge March 30, 2026 05:41
@alecthomas alecthomas force-pushed the aat/refactor-metadatadb-backend-ops branch from 4d0666a to 4309cba Compare March 30, 2026 05:51
…terface

Move the metadatadb abstraction from blob-level Load/Store to
operation-level Apply/Query, enabling future backends (e.g. Redis)
to handle ops natively rather than serializing entire namespaces.

- Introduce Op and ReadOp sealed interfaces with exhaustive type
  switches in applyOp/queryState
- Replace old Backend (Load/Store/Lock/Unlock) with new Backend
  (Apply/Query/Flush/Close)
- Inline sync machinery directly into S3Backend
- MemoryBackend implements Backend directly with no sync
- Add TwoBackendsConcurrentOps test exercising cross-backend sync

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@alecthomas alecthomas force-pushed the aat/refactor-metadatadb-backend-ops branch from 4309cba to 4946314 Compare March 30, 2026 07:15
@alecthomas alecthomas merged commit a182f79 into main Mar 30, 2026
7 checks passed
@alecthomas alecthomas deleted the aat/refactor-metadatadb-backend-ops branch March 30, 2026 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant